﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
    [XrmEntity("new_recommend", "new_recommendid")]
    public class RecommendModel:BaseModel
    {
        /// <summary>
        /// 推荐记录ID
        /// </summary>
        [XrmFieldMapping("new_recommendid", XrmAttributeType.UniqueIdentifier)]
        public Guid new_recommendId { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [XrmFieldMapping("new_remark", XrmAttributeType.String, true)]
        public string new_remark { get; set; }
        /// <summary>
        /// 患者姓名
        /// </summary>
        [XrmFieldMapping("new_lead", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("lead", default(string))]
        public Guid? new_lead { get; set; }

        /// <summary>
        /// 网医姓名
        /// </summary>
        [XrmFieldMapping("new_contact", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("contact", default(string))]
        public Guid? new_contact { get; set; }

        /// <summary>
        /// 医院
        /// </summary>
        [XrmFieldMapping("new_hospital", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_hospital", default(string))]
        public Guid? new_hospital { get; set; }

        /// <summary>
        /// 科室
        /// </summary>
        [XrmFieldMapping("new_department", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("new_department", default(string))]
        public Guid? new_department { get; set; }

        /// <summary>
        /// 主要需求
        /// </summary>
        [XrmFieldMapping("new_content", XrmAttributeType.XrmOptionSetValue, true)]
        public int? new_content { get; set; }

        /// <summary>
        /// 负责人ID
        /// </summary>
        [XrmFieldMapping("ownerid", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("systemuser", default(string))]
        public Guid? ownerid { get; set; }

        /// <summary>
        /// 网医所在医院
        /// </summary>
        [XrmFieldMapping("new_networkhospitalwherethehospital", XrmAttributeType.EntityReference, true)]
        [XrmReferenceType("competitor", default(string))]
        public Guid? new_networkhospitalwherethehospital { get; set; }
        /// <summary>
        /// 预约到院日期
        /// </summary>
        [XrmFieldMapping("new_appointmenttothehospitaldate", XrmAttributeType.DateTime, true)]
        public DateTime? new_appointmenttothehospitaldate { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        //[XrmFieldMapping("createdon", XrmAttributeType.DateTime, true)]
        //public DateTime? createdon { get; set; }

        /// <summary>
        /// 到院确认0、未到院；1、已到院
        /// </summary>
        [XrmFieldMapping("new_istohospital", XrmAttributeType.Boolean, true)]
        public bool? new_istohospital { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        [XrmFieldMapping("new_description", XrmAttributeType.String, true)]
        public string new_description { get; set; }

        [XrmFieldMapping("new_referraltype", XrmAttributeType.XrmOptionSetValue, true)]
        public int new_referraltype { get; set; }

        [XrmFieldMapping("new_ismedicalcouplet", XrmAttributeType.Boolean, true)]
        public bool? new_ismedicalcouplet { get; set; }

        [XrmFieldMapping("new_name", XrmAttributeType.String, true)]
        public string new_name { get; set; }
    }
}
